import request from '@/utils/request'

// 查询队列信息列表
export function listQueueInfo(query) {
  return request({
    url: '/qbs/QueueInfoHistory/list',
    method: 'get',
    params: query
  })
}

// 查询队列信息详细
export function getQueueInfo(id) {
  return request({
    url: '/qbs/triage/' + id,
    method: 'get'
  })
}

// 新增队列信息
export function addQueueInfo(data) {
  return request({
    url: '/qbs/triage/save',
    method: 'post',
    data: data
  })
}

// 修改队列信息
export function editQueueInfo(data) {
  return request({
    url: '/qbs/triage/update',
    method: 'put',
    data: data
  })
}

// 删除队列信息
export function delQueueInfo(id) {
  return request({
    url: '/qbs/triage/remove/' + id,
    method: 'delete'
  })
}

// 弃号队列信息
export function abandonedQueueInfo(id) {
  return request({
    url: '/qbs/triage/abandoned/' + id,
    method: 'delete'
  })
}

// 复诊队列信息
export function replayQueueInfo(id) {
  return request({
    url: '/qbs/triage/replay/' + id,
    method: 'delete'
  })
}

// 优先队列信息
export function priorQueueInfo(id) {
  return request({
    url: '/qbs/triage/prior/' + id,
    method: 'delete'
  })
}

// 报到队列信息
export function reportQueueInfo(data) {
  return request({
    url: '/qbs/triage/report',
    method: 'put',
    data: data
  })
}

// 转诊队列信息
export function referralQueueInfo(data) {
  return request({
    url: '/qbs/triage/referral',
    method: 'put',
    data: data
  })
}

// 导出队列信息
export function exportQueueInfo(query, ids) {
  return request({
    url: '/qbs/QueueInfoHistory/export/' + ids,
    method: 'get',
    params: query
  })
}
